
const { STRING, INTEGER, LONGSTRING } = require('../types')

module.exports = (sequelize) => {
  const property = sequelize.define(
    'property',
    {// 在这里定义模型属性
      a_id: {
        type: INTEGER,
        primaryKey: true, // 主键
        autoIncrement: true, // 自增
        allowNull: false // 允许空 不给这个属性默认表述允许
      },
      a_name: {
        type: STRING,
      },
      a_calliphist: {
        type: STRING,
      },
      a_time: {
        type: STRING,
      },
      a_style: {
        type: Number,
      },
      a_material: {
        type: Number,
      },
      a_event: {
        type: Number,
      },
      a_img: {
        type: STRING,
      },
      a_article: {
        type: LONGSTRING,
      },
    }, 
    {
    tableName: "property",//直接提供表名
    timestamps: false
   }
  );
  return property
}
